package com.hnguigu.health.houduan.lq.service_lq.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hnguigu.health.houduan.lq.service_lq.TSportsItemLibraryService;
import com.hnguigu.health.mapper.TSportsItemLibraryMapper;
import com.hnguigu.health.pojo.TSportsItemLibrary;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TSportsItemLibraryServiceImpl  implements TSportsItemLibraryService {
    @Autowired(required = false)
    TSportsItemLibraryMapper tSportsItemLibraryMapper;
    @Override
    public PageInfo<TSportsItemLibrary> selectAllTSports(int page, int num, String content) {
        PageHelper.startPage(page,num);
        return new PageInfo<>(tSportsItemLibraryMapper.selectAllTSports(content));
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return tSportsItemLibraryMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insertSelective(TSportsItemLibrary record) {
        return tSportsItemLibraryMapper.insertSelective(record);
    }

    @Override
    public int updateByPrimaryKeySelective(TSportsItemLibrary record) {
        return tSportsItemLibraryMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public TSportsItemLibrary Lastbean() {
        return tSportsItemLibraryMapper.Lastbean();
    }
}
